package com.boot.entity;

import com.boot.annotation.LogCompar;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {

    private Long id;

    private String username;

    @LogCompar("真实姓名")
    private String realName;

    @LogCompar(value = "性别", readConverterExp = "0=男,1=女,2=未知")
    private Integer sex;

    @LogCompar("邮箱")
    private String email;

    @LogCompar(value = "薪水")
    private BigDecimal salary;

    @LogCompar(value = "创建时间", dateFormat = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime createTime;
}

